import React,{Component} from 'react';
require('../Comment.css');

export default  class PercentageShower extends Component{
    constructor(){
        super()
    }

    render(){
        const{num=0}=this.props
        let result=!isNaN(num)?(num*100).toFixed(2)+'%':''
    return(
        <div className="comment-input">
        <div className="comment-field">
          <span className="comment-field-name">计算后数据：</span>
          <div className="comment-field-input">
            <input  value={result} />
          </div>
        </div>

      </div>
    )
    }

}